//package com.xcexample.adclasscard.main
//
//import android.util.SparseArray
//import android.view.View
//import android.view.ViewGroup
//import androidx.recyclerview.widget.RecyclerView
//import com.shuyu.gsyvideoplayer.listener.VideoAllCallBack
//import com.shuyu.gsyvideoplayer.video.StandardGSYVideoPlayer
//import com.xcexample.adclasscard.R
//import com.xcexample.adclasscard.main.VideoAdapter.VideoHolder
//import com.youth.banner.adapter.BannerAdapter
//import com.youth.banner.util.BannerUtils
//
//
//class VideoAdapter(
//    mDatas: List<String>,
//    var currentStart: (position: Int, videoplayer: StandardGSYVideoPlayer) -> Unit,
//    var next: (position: Int, videoplayer: StandardGSYVideoPlayer) -> Unit
//) :
//    BannerAdapter<String, VideoHolder>(mDatas) {
//    override fun onCreateHolder(parent: ViewGroup, viewType: Int): VideoHolder {
//        return VideoHolder(
//            BannerUtils.getView(
//                parent,
//                R.layout.banner_video
//            )
//        )
//    }
//
//    private val mVHMap = SparseArray<RecyclerView.ViewHolder>()
//    override fun onBindView(holder: VideoHolder?, data: String, position: Int, size: Int) {
//        mVHMap.append(position, holder)
//        holder?.player?.setUp(data, true, null)
//        holder?.player?.backButton?.visibility = View.GONE
//        holder?.player?.startPlayLogic()
//        holder?.player?.setIsTouchWiget(false)
//        holder?.player?.setVideoAllCallBack(object : VideoAllCallBack {
//            override fun onStartPrepared(url: String?, vararg objects: Any?) {
//            }
//
//            override fun onPrepared(url: String?, vararg objects: Any?) {
//                currentStart(position, holder.player)
//            }
//
//            override fun onClickStartIcon(url: String?, vararg objects: Any?) {
//            }
//
//            override fun onClickStartError(url: String?, vararg objects: Any?) {
//            }
//
//            override fun onClickStop(url: String?, vararg objects: Any?) {
//            }
//
//            override fun onClickStopFullscreen(url: String?, vararg objects: Any?) {
//            }
//
//            override fun onClickResume(url: String?, vararg objects: Any?) {
//            }
//
//            override fun onClickResumeFullscreen(url: String?, vararg objects: Any?) {
//            }
//
//            override fun onClickSeekbar(url: String?, vararg objects: Any?) {
//            }
//
//            override fun onClickSeekbarFullscreen(url: String?, vararg objects: Any?) {
//            }
//
//            override fun onAutoComplete(url: String?, vararg objects: Any?) {
//                next(position, holder.player)
//            }
//
//            override fun onEnterFullscreen(url: String?, vararg objects: Any?) {
//            }
//
//            override fun onQuitFullscreen(url: String?, vararg objects: Any?) {
//            }
//
//            override fun onQuitSmallWidget(url: String?, vararg objects: Any?) {
//            }
//
//            override fun onEnterSmallWidget(url: String?, vararg objects: Any?) {
//            }
//
//            override fun onTouchScreenSeekVolume(url: String?, vararg objects: Any?) {
//            }
//
//            override fun onTouchScreenSeekPosition(url: String?, vararg objects: Any?) {
//            }
//
//            override fun onTouchScreenSeekLight(url: String?, vararg objects: Any?) {
//            }
//
//            override fun onPlayError(url: String?, vararg objects: Any?) {
//            }
//
//            override fun onClickStartThumb(url: String?, vararg objects: Any?) {
//            }
//
//            override fun onClickBlank(url: String?, vararg objects: Any?) {
//            }
//
//            override fun onClickBlankFullscreen(url: String?, vararg objects: Any?) {
//            }
//
//        })
//    }
//
//    inner class VideoHolder(view: View) : RecyclerView.ViewHolder(view) {
//        var player: StandardGSYVideoPlayer = view.findViewById(R.id.player)
//    }
//
//    fun getVHMap(): SparseArray<RecyclerView.ViewHolder> {
//        return mVHMap
//    }
//}
